#ifndef LOGIN_H
#define LOGIN_H

#include <QWidget>
#include <QMessageBox>
#include <QTimer>

namespace Ui {
class Login;
}

class LoginWindow : public QWidget
{
    Q_OBJECT

signals:
    void loginSucc();

public:
    explicit LoginWindow(QWidget *parent = nullptr);
    ~LoginWindow();

private slots:
    void on_pushButtonLogin_clicked();
    void on_pushButtonExit_clicked();

    void onTimeout();
    void onUserActivityDetected();
    void updateTimerDisplay();

private:
    Ui::Login *ui;

    QTimer *timer;
    const int timeout = 10; // 超时时间
    int remainingTime;
};

#endif
